#ifndef MYSPACES_H
#define MYSPACES_H

#include "pch.h"
#include "mywebview.h"
#include "tabpage.h"
#include <mynetworkaccessmanager.h>
#include <cookiejar.h>
#include "myspaces_global.h"
#include <downloadui.h>

class QWebView;
QT_BEGIN_NAMESPACE
class QLineEdit;
class QProgressBar;
class QLabel;
QT_END_NAMESPACE
class tabPage;

class MySpaces_EXPORT mySpaces : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit mySpaces(QWidget *parent = 0);
    ~mySpaces();

    static CookieJar *cookieJar();
    static myNetworkAccessManager *networkAccessManager();
    static DownloadUI *downloadManager();
    static void showDownloadManager();

protected:
    void addjQuery();
    void closeEvent(QCloseEvent *event);
    void resizeEvent(QResizeEvent *event);
    void resizeTabs();
    QString GenTitle(QString intext);

protected slots:
    void openNewTab(QUrl url);
    void closeTab(int index);
    void initForm();
    void refreshTitles(const QString);
    void refreshTitles();
    void exitApp();
    
private:
    MySettings *mySpacesSettings;
    QTabWidget *tabs;
    QString tabsStyle;
    int WindowWidth;
    static myNetworkAccessManager *s_networkAccessManager;
    static DownloadUI *s_downloadManager;
};

#endif // MYSPACES_H
